/**
 * 
 */
package com.ncr.travel.appmgr.model;

import java.util.List;

import com.ncr.travel.appmgr.model.shared.ColumnSpecification;
import com.ncr.travel.appmgr.model.shared.RowSpecification;

/**
 * @author sn185078
 *
 */
public class RowSpecificationJson implements RowSpecification {

	String rowName;
	String rowValue;
	String rowWidget;
	String rowStyle;

	List<ColumnSpecification> colSpecification;

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#getRowValue()
	 */
	@Override
	public String getRowValue() {
		return rowValue;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#getRowWidget()
	 */
	@Override
	public String getRowWidget() {
		return rowWidget;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#setRowWidget(java.lang.String)
	 */
	@Override
	public void setRowWidget(String rowWidget) {
		this.rowWidget = rowWidget;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#getRowStyle()
	 */
	@Override
	public String getRowStyle() {
		return rowStyle;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#setRowStyle(java.lang.String)
	 */
	@Override
	public void setRowStyle(String rowStyle) {
		this.rowStyle = rowStyle;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#setRowValue(java.lang.String)
	 */
	@Override
	public void setRowValue(String rowValue) {
		this.rowValue = rowValue;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#getColSpecification()
	 */
	@Override
	public List<ColumnSpecification> getColSpecification() {
		return colSpecification;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#getRowName()
	 */
	@Override
	public String getRowName() {
		return rowName;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#setRowName(java.lang.String)
	 */
	@Override
	public void setRowName(String rowName) {
		this.rowName = rowName;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RowSpecification#setColSpecification(java.util.List)
	 */
	@Override
	public void setColSpecification(List<ColumnSpecification> colSpecification) {
		this.colSpecification = colSpecification;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((colSpecification == null) ? 0 : colSpecification.hashCode());
		result = prime * result + ((rowName == null) ? 0 : rowName.hashCode());
		result = prime * result + ((rowStyle == null) ? 0 : rowStyle.hashCode());
		result = prime * result + ((rowValue == null) ? 0 : rowValue.hashCode());
		result = prime * result + ((rowWidget == null) ? 0 : rowWidget.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RowSpecificationJson other = (RowSpecificationJson) obj;
		if (colSpecification == null) {
			if (other.colSpecification != null)
				return false;
		} else if (!colSpecification.equals(other.colSpecification))
			return false;
		if (rowName == null) {
			if (other.rowName != null)
				return false;
		} else if (!rowName.equals(other.rowName))
			return false;
		if (rowStyle == null) {
			if (other.rowStyle != null)
				return false;
		} else if (!rowStyle.equals(other.rowStyle))
			return false;
		if (rowValue == null) {
			if (other.rowValue != null)
				return false;
		} else if (!rowValue.equals(other.rowValue))
			return false;
		if (rowWidget == null) {
			if (other.rowWidget != null)
				return false;
		} else if (!rowWidget.equals(other.rowWidget))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "RowSpecificationJson [rowName=" + rowName + ", rowValue=" + rowValue + ", rowWidget=" + rowWidget + ", rowStyle=" + rowStyle + ", colSpecification=" + colSpecification + "]";
	}

}
